import config from '@/config/'

import container from '@/components/frame/container'

import ticketIndex from '@/views/ticket/home'
import ticketList from '@/views/ticket/list'
import ticketAdd from '@/views/ticket/listAdd'
import ticketUpdate from '@/views/ticket/listUpdate'

import ticketDetail from '@/views/ticket/Details'
import tongjiIndex from '@/views/tongji/index'
import areaSortRate from '@/views/tongji/areaSortRate'
import eventPoint from '@/views/tongji/eventPoint'
import everyDayEvent from '@/views/tongji/everyDayEvent'
import everyMonthEvent from '@/views/tongji/everyMonthEvent'
import timelinessRate from '@/views/tongji/timelinessRate'
import overTime from '@/views/tongji/overtime'
import used from '@/views/tongji/used'
import newPeople from '@/views/tongji/newPeople'

import workLoad from '@/views/tongji/workLoad'

import login from '@/views/login'
import clear from '@/views/clear'

const routers = [{
        path: '/',
        redirect: '/home/index',
        hiddenMenu: true
    },
    {
        path: '/login',
        component: login,
        hiddenMenu: true
    },
    {
        path: '/clear',
        component: clear,
        name: '清除',
        hiddenMenu: true
    },
    {
        path: '/home',
        name: '首页',
        component: container,
        redirect: '/home/index',
        iconName: 'fa fa-th',
        children: [{
            name: '首页',
            path: 'index',
            iconName: 'fa fa-circle-o',

            hiddenMenu: false,
            component: ticketIndex
        }]
    },
    {
        path: '/ticket',
        name: '事件工单',
        component: container,
        redirect: '/ticket/list',
        iconName: 'fa fa-table',
        children: [{
                name: '事件工单',
                path: 'list',
                iconName: 'fa fa-circle-o',

                component: ticketList,
                hiddenMenu: false
            },
            {
                name: '新建工单',
                path: 'listadd',
                component: ticketAdd,
                hiddenMenu: true
            },
            {
                name: '工单处理',
                path: 'details',
                component: ticketDetail,
                hiddenMenu: true
            },
            {
                name: '工单修改',
                path: 'listUpdate',
                component: ticketUpdate,
                hiddenMenu: true
            }
        ]
    },
    {
        path: '/tongji',
        name: '统计分析',
        component: container,
        redirect: '/tongji/eventpoint',
        iconName: 'fa fa-pie-chart',
        children: [{
                name: '事件点位分部图',
                path: 'eventpoint',
                hiddenMenu: false,
                component: eventPoint,
                iconName: 'fa fa-circle-o',
            },
            {
                name: '按日环比',
                path: 'everydayevent',
                hiddenMenu: false,
                component: everyDayEvent,
                iconName: 'fa fa-circle-o',
            },
            {
                name: '按月环比',
                path: 'everymonthevent',
                hiddenMenu: false,
                component: everyMonthEvent,
                iconName: 'fa fa-circle-o',
            },
            {
                name: '分类统计',
                path: 'areasortrate',
                hiddenMenu: false,
                component: areaSortRate,
                iconName: 'fa fa-circle-o',
            },
            {
                name: '及时率统计',
                path: 'timelinessrate',
                hiddenMenu: false,
                component: timelinessRate,
                iconName: 'fa fa-circle-o',
            },
            {
                name: '人员工作量',
                path: 'workload',
                hiddenMenu: false,
                component: workLoad,
                iconName: 'fa fa-circle-o',
            },
            {
                name: '用料统计',
                path: 'used',
                hiddenMenu: false,
                component: used,
                iconName: 'fa fa-circle-o',
            },
            {
                name: '超时工单',
                path: 'overtime',
                hiddenMenu: true,
                component: overTime,
                iconName: 'fa fa-circle-o',
            },
            {
                name: '人员新建工单量',
                path: 'newPeople',
                hiddenMenu: false,
                component: newPeople,
                iconName: 'fa fa-circle-o',
            }
        ]
    }
]


export default routers;